/**
 *
 */
$(function(){

   var shopId = getQueryString('shopId');
   //console.log(shopId);
    //商店的初始信息
    var shopInfoUrl = '/myo2o/shopadmin/getshopmanagementinfo?shopId='+shopId;
    //var shopedit = '/myo2o/shop/shopOperation?shopId='+shopId;
    var shopedit = '/myo2o/shop/shopOperation?shopId='+shopId;


   //将shopid放入session域中，从而为之后的商品管理的验证
   $.getJSON(shopInfoUrl, function(data){
        if(data.redirect) {
            window.location.href = data.url;
        }else {
            if (data.shopId != undefined && data.shopId != null) {
                shopId = data.shopId;
            }
           /* $('#shopInfo').attr('href', '/myo2o/shopadmin/getshopmanagementinfo?shopId=' + shopId);*/
            $('#shopInfo').attr('href', shopedit);
        }
    });
    //给商店信息处添加 点击事件，触发则跳转到响应的页面去
    $('#shopInfo').click(function () {
        console.log(1);
        //请求转发到另外一个链接上去，并带上shopId
        window.location.href=shopedit;
    });
});
